<!doctype html>
<html>
<head>
    <title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link rel="stylesheet" href="../res/css/weui.css"/>
<link rel="stylesheet" href="../res/css/weuix.css"/>
<link rel="stylesheet" href="../res/css/common.css" />
<script src="../res/js/zepto.min.js"></script>
<script src="../res/js/zepto.weui.js"></script> 
<script src="../res/js/common.js"></script>
<script>
    function doLogin() {
        var strUserName, strPassWord;
        strUserName = "test";
        strPassWord = "test";
        var paramJson = { "phone": strUserName, "paw": strPassWord, "hospital_id": 1, "user_type": "1", "openid": getQst("openid"), "rand": Math.random() };
        ajaxPost("publicLogin_login_loginData", paramJson, doLoginOk);
        return false;
    }

    function doLoginOk(jsonInfo) {
        if (jsonInfo.code == '200') {
            var userJson = jsonInfo.data;
            if (userJson.zt == 2) {
                setUserInfo(userJson);
                setUserType('0');
                var strOrgId, strOpenId, strGoUrl;
                strOrgId = getQst("orgid");
                strOpenId = getQst("openid");
                switch (getQst("go_type")) {
                    case "1": //医生详情
                        strGoUrl = 'inquiry_go_doctor.htm?orgid=' + strOrgId + '&openid=' + strOpenId + '&doctor_id=' + getQst("doctor_id") + "&rand=" + Math.random();
                        break;
                    case "2": //处方详情
                        strGoUrl = 'inquiry_go_order.htm?orgid=' + strOrgId + '&openid=' + strOpenId + '&oid=' + getQst("order_id") + "&rand=" + Math.random();
                        break;
                    case "3": //病历中心
                        strGoUrl = 'inquiry_go_record.htm?orgid=' + strOrgId + '&openid=' + strOpenId + '&log_id=' + getQst("log_id") + "&rand=" + Math.random();
                        break;
                    case "4": //就诊咨询
                        strGoUrl = 'inquiry_doctor_patient.htm?orgid=' + strOrgId + '&openid=' + strOpenId + '&log_type=' + getQst("log_type") + '&doctor_id=' + getQst("doctor_id") + '&hospital_id=' + getQst("hospital_id") + "&rand=" + Math.random();
                        break;
                // ---------------------4.21
                    case "5":    
                        strGoUrl = 'inquiry_doctor_patient.htm?orgid=' + strOrgId + '&openid=' + strOpenId + '&log_type=' + getQst("log_type") + '&doctor_id=' + getQst("doctor_id") + '&hospital_id=' + getQst("hospital_id") + "&rand=" + Math.random()+"&tvflag=1";
                          break;
               //  -----------------     
                    default://医生列表
                        strGoUrl = 'inquiry_doctor.htm?orgid=' + getQst("orgid") + '&openid=' + getQst("openid") + "&rand=" + Math.random();
                        break;
                }
                goPage(strGoUrl);
            }
            else {
                msgInfo(jsonInfo.info);
                $('#tipInfo').text(jsonInfo.info);
            }
        }
        else {
            msgInfo(jsonInfo.info);
            $('#tipInfo').text(jsonInfo.info);
        }
    }

</script>
</head>
<body>
</body>
</html>